package com.fish.admin.module.salesman.validation;


import com.fish.admin.module.salesman.validator.DataScopeValidator;
import jakarta.validation.Constraint;
import jakarta.validation.Payload;

import java.lang.annotation.*;


/**
 * @ClassName: DataScope
 * @Description:手机号验证注解
 * @author: lindy
 * @date: 2024年1月18日 上午10:12:37
 * @version:V1.0
 */
@Target({
        ElementType.METHOD,
        ElementType.FIELD,
        ElementType.ANNOTATION_TYPE,
        ElementType.CONSTRUCTOR,
        ElementType.PARAMETER,
        ElementType.TYPE_USE
})
@Retention(RetentionPolicy.RUNTIME)
@Documented
@Constraint(
        validatedBy = DataScopeValidator.class
)
public @interface DataScope {

    String message() default "数据权限不能为空，且值必须为1或者2";

    Class<?>[] groups() default {};

    Class<? extends Payload>[] payload() default {};

}
